Skip to content

fix: omit src attribute when external is false to prevent invalid script load - #11

Open
kdxhub wants to merge 1 commit into
RafidMuhymin:mainfrom
kdxhub:main
Open

fix: omit src attribute when external is false to prevent invalid script load#11
kdxhub wants to merge 1 commit into
RafidMuhymin:mainfrom
kdxhub:main

Conversation

@kdxhub

@kdxhub kdxhub commented Jul 9, 2026

Copy link
Copy Markdown

When external is disabled, the expression external && path.substring(6) evaluates to false, which is rendered as src="false" in the HTML.

This causes the browser to attempt loading a non-existent script instead of using the inline set:html content, breaking SPA behavior.

This PR changes the logic to external ? path.substring(6) : undefined, so the src attribute is omitted entirely when not needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant